class HomeController < ApplicationController
    def index
      @products = Product.all
      respond_to do |format|
      	format.html #index.html.erb
      	format.json { render json: @products }
      end
      if(session[:user_id])
      	@user = User.find(session[:user_id])
      else
      	@user = -1
      end
      
    end
end
